package com.edu.chapter09_kotlin

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.Button

class MyPageActivity : AppCompatActivity(), View.OnClickListener {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_my_page)
        findViewById<Button>(R.id.btn_swap).setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        if (v!=null){
            if (v.id==R.id.btn_swap){
                val intent = Intent(this,RecyclerViewActivity().javaClass)
                startActivity(intent)
            }
        }
    }
}